﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace IniTechCaash.Domain.Entities
{
    /// <summary>
    /// Base class for all objects that EntityFramework persists in the database. 
    /// </summary>
    public abstract class Entity
    {
        /// <summary>
        /// Database generated surrogate key. All entities shall use this column as their primary key. 
        /// </summary>
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int Id { get; set; }

        /// <summary>
        /// Default constructor. 
        /// </summary>
        public Entity()
        {
        }
    }
}
